package com.muke.spring.demo1;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

/**
* Created By lijiliang on 2018年7月16日 下午10:35:02
*/
public class AccountDaoImpl extends JdbcDaoSupport implements AccountDao {

	@Override
	public void outMoney(String out, Double money) {

		String sql="update account set money = money - ? where name = ?";
		this.getJdbcTemplate().update(sql, money,out);
	}

	@Override
	public void inMoney(String in, Double money) {
		String sql="update account set money = money + ? where name = ?";
		this.getJdbcTemplate().update(sql, money,in);

	}

}
